package com.fourthGroup.feign.fallback;

import com.fourthGroup.feign.OrderFeignClient;
import com.fourthGroup.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class OrderFeignFallback implements OrderFeignClient {

    @Override
    public Result<Double> applyCoupon(String orderId, Long couponId) {
        log.error("订单服务调用失败: orderId={}, couponId={}", orderId, couponId);
        return Result.error("订单服务不可用，请稍后再试");
    }
} 